using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary.Helpers.Builders;

namespace fenk.Proveedores
{
    public partial class ImprimirODC : mvLibrary.BaseForm
    {
        public ImprimirODC()
        {
            InitializeComponent();
        }

        /*Con esto adaptamos el reporte que antes solo se imprimia en pick,
         * para poder imprimirlo en windows y que quede prolijo.
         */
        public override void BeforeCreatePdf(ref string report)
        {
            PickReportFormatterBuilder reportFormatterBuilder = new PickReportFormatterBuilder(report);

            reportFormatterBuilder.ReduceTwoEspacesToOne();
            reportFormatterBuilder.RemoveEWAndFWError();
            reportFormatterBuilder.RemoveMinusOneMinusZero();
            reportFormatterBuilder.FixSenioresWordProblem();
            reportFormatterBuilder.RemovePotencialThreeError();
            report = reportFormatterBuilder.Build();
            
            report = report.Replace("ETOTAL", "TOTAL");
            report = report.Replace("EIva", "Iva");
            report = report.Replace("ENETO", "NETO");
            report = report.Replace("EPerc", "Perc");

        }

    }
}

